package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TZczbMapper;
import com.ruoyi.system.domain.TZczb;
import com.ruoyi.system.service.ITZczbService;
import com.ruoyi.common.support.Convert;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;


/**
 * 轴承在压装机上准备到位状态 服务层实现
 * 
 * @author ruoyi
 * @date 2019-02-22
 */
@Service
public class TZczbServiceImpl implements ITZczbService 
{
	@Autowired
	private TZczbMapper tZczbMapper;

	/**
     * 查询轴承在压装机上准备到位状态信息
     * 
     * @param id 轴承在压装机上准备到位状态ID
     * @return 轴承在压装机上准备到位状态信息
     */
    @Override
    @DataSource(value = DataSourceType.SLAVE)
	public TZczb selectTZczbById(String id)
	{
	    return tZczbMapper.selectTZczbById(id);
	}
	
	/**
     * 查询轴承在压装机上准备到位状态列表
     * 
     * @param tZczb 轴承在压装机上准备到位状态信息
     * @return 轴承在压装机上准备到位状态集合
     */
	@Override
	@DataSource(value = DataSourceType.SLAVE)
	public List<TZczb> selectTZczbList(TZczb tZczb)
	{
	    return tZczbMapper.selectTZczbList(tZczb);
	}
	
    /**
     * 新增轴承在压装机上准备到位状态
     * 
     * @param tZczb 轴承在压装机上准备到位状态信息
     * @return 结果
     */
	@Override
	@DataSource(value = DataSourceType.SLAVE)
	public int insertTZczb(TZczb tZczb)
	{
	    return tZczbMapper.insertTZczb(tZczb);
	}
	
	/**
     * 修改轴承在压装机上准备到位状态
     * 
     * @param tZczb 轴承在压装机上准备到位状态信息
     * @return 结果
     */
	@Override
	@DataSource(value = DataSourceType.SLAVE)
	public int updateTZczb(TZczb tZczb)
	{
	    return tZczbMapper.updateTZczb(tZczb);
	}

	/**
     * 删除轴承在压装机上准备到位状态对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	@DataSource(value = DataSourceType.SLAVE)
	public int deleteTZczbByIds(String ids)
	{
		return tZczbMapper.deleteTZczbByIds(Convert.toStrArray(ids));
	}
	
}
